import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.codec.binary.Base64;
import org.junit.Test;

import com.vcredit.framework.util.HttpRequest;
import com.vcredit.framework.util.JacksonUtil;

public class Reoprt {
	String url = "http://10.138.60.149:9001/GateWay/RCRestService.svc/DoUnifromDecisionCredit/630103197805260429";
	String phoneUrl = "http://10.138.60.43:7777/mobile/query/summaryById/Json";
	String newUrl = "http://10.138.60.149:9090/GetCreditVariableValues";

	@Test
	public void zhengxin() throws Exception {
		try {
			Map<String, Object> ma = new HashMap<String, Object>();
			ma.put("ReportId", "105");
			ma.put("ReportType", "10");
			ma.put("VbCols", "all");
			ma.put("IdentityNo", "630103197805260429");
			String json = JacksonUtil.Obj2Json(ma);

			String resultJson = HttpRequest.doJson(newUrl, json);
			System.out.println(111 + resultJson);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
	}

	@Test
	public void mobile() throws Exception {
		String resultJson = "";
		try {
			Map<String, Object> ma = new HashMap<String, Object>();
			/*
			 * ma.put("mobile", "15021633412"); ma.put("IdentityCard",
			 * "452126199010190019");
			 */
			ma.put("id", "jxl_82057");
			String json = JacksonUtil.Obj2Json(ma);
			System.out.println("手机账单请求Json" + json);
			resultJson = HttpRequest.doJson(phoneUrl, Base64.encodeBase64String(json.getBytes("utf-8")));
			System.out.println("手机账单拉取详情" + resultJson);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		String[] a = { "cust_statistics_id", "cust_id", "scr_cell_max_plan_amt", "trc_lsm_one_avg_plan_amt", "trc_lsm_one_avg_total_amt", "scr_heighty_days_call_subttl", "ld_thirty_days_total_ppl_cnt",
				"ld_hfifty_days_total_ppl_cnt", "scr_cell_called_phone_cnt", "scr_cell_called_ctt_days_cnt", "sms_hfifty_days_ld_ttl_ppl", "scr_cell_evn_call_ttl_time", "scr_cell_call_ttl_time",
				"ld_hfifty_days_smy_ctt_mrg", "ld_hundred_fifty_days_ctt_cnt", "scr_cell_aftn_call_ttl_time", "scr_cell_calling_ttl_time", "ld_ninety_week_ctt_ppl", "ld_ninety_total_ppl_cnt", "ld_ninety_tcall_ppl_cnt",
				"ld_ninety_tans_total_ppl", "call_heighty_days_call_time", "call_heighty_days_lstm_call", "call_heighty_days_called_time", "call_heighty_days_called_cnt", "scr_cell_ph_use_mons",
				"ld_hundred_fifty_days_ctt_day", "ld_thirty_days_smy_ans", "ld_hfifty_days_smy_ans", "loan_delay_cnt", "ld_ninety_qry_num", "crd_mth_lm_two_years_min", "sex", "education", "marriage",
				"credit_normal_pay_max", "lm_two_years_ln_paycnt_max", "lm_two_years_crd_col_max", "norm_used_sum", "norm_cdt_sum", "norm_cdt_bal_avg", "lst_pay_debt_act_num", "lm_two_years_loan_usedrate",
				"norm_used_rate_debt", "lm_twelvemonth_loan_usedrate", "norm_cdt_bal_used_pct_avg", "credit_expired_time", "mobile_expired_time", "created_time", "updated_time" };
		List<Map<String, Object>> lit = new ArrayList<Map<String, Object>>();
		for (int i = 0; i < a.length; i++) {
			String string = a[i];
			Map lit2 = new HashMap<String, Object>();
			lit2.put(string, string.length());
			lit.add(lit2);
			System.out.println("长度" + string.length() + "  字段名称： " + string);
		}
	}
}
